import request from '@/utils/request'

// 创建商品子分类
export function createProductLevelTow(data) {
  return request({
    url: '/market/product-level-tow/create',
    method: 'post',
    data: data
  })
}

// 更新商品子分类
export function updateProductLevelTow(data) {
  return request({
    url: '/market/product-level-tow/update',
    method: 'put',
    data: data
  })
}

// 删除商品子分类
export function deleteProductLevelTow(id) {
  return request({
    url: '/market/product-level-tow/delete?id=' + id,
    method: 'delete'
  })
}

// 获得商品子分类
export function getProductLevelTow(id) {
  return request({
    url: '/market/product-level-tow/get?id=' + id,
    method: 'get'
  })
}

// 获得商品子分类分页
export function getProductLevelTowPage(params) {
  return request({
    url: '/market/product-level-tow/page',
    method: 'get',
    params
  })
}
export function getProductLevelTowList() {
  return request({
    url: '/market/product-level-tow/list',
    method: 'get',
  })
}
// 导出商品子分类 Excel
export function exportProductLevelTowExcel(params) {
  return request({
    url: '/market/product-level-tow/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
